/**
 * @Description:  RSU管理API
 * @Author:       zhaixiangjun
 * @Date: 2021-11-09 15:13:26
 * @LastEditors:  zhaixiangjun
 * @LastEditTime: 2021-11-09 15:14:32
 */
import { service as request, BasePath } from '../request'

/**
  * 查询所有RSU编号列表
  * @returns {Object} Promise
  */
export const getRsuList = () => request({
  url: `${BasePath}/rsuinfo/all`,
  method: 'GET'
})

/**
  * 查询路侧编号列表
  * @returns {Object} Promise
  */
export const getRoadSideIds = () => request({
  url: `${BasePath}/roadsideinfo/all`,
  method: 'GET'
})

/**
  * 添加RSU数据
  * @param {Object} data RSU信息
  * @returns {Object} Promise
  */
export const addRSUInfo = (data) => request({
  url: `${BasePath}/rsuinfo`,
  method: 'POST',
  data
})

/**
  * 编辑路侧数据
  * @param {Object} data RSU信息
  * @returns {Object} Promise
  */
export const editRSUInfo = (data) => request({
  url: `${BasePath}/rsuinfo`,
  method: 'PUT',
  data
})
